# Copyright (c) Meta Platforms, Inc. and affiliates.

load("../../../defs.bzl", "zs_fuzzers", "zs_unittest")

oncall("data_compression")

zs_unittest(
    name = "test",
    srcs = [
        "lex_test.cpp",
        "segmenter_test.cpp",
    ],
    deps = [
        "..:csv_parser",
        "../../../cpp:openzl_cpp",
        "../../../tests:utils",
    ],
)

zs_fuzzers(
    srcs = [
        "CsvLexerFuzzer.cpp",
    ],
    ftest_names = [
        ("CsvLexerTest", "RandomInputFuzzer"),
    ],
    deps = [
        "..:csv_parser",
        "../../../cpp:openzl_cpp",
        "../../../tests/datagen:datagen",
        "fbsource//xplat/security/lionhead/utils/lib_ftest:lib",
    ],
)

zs_fuzzers(
    srcs = [
        "CsvSegmenterFuzzer.cpp",
    ],
    ftest_names = [
        ("CsvSegmenterTest", "RandomInputFuzzer"),
    ],
    deps = [
        "..:csv_parser",
        "../../../cpp:openzl_cpp",
        "../../../tests/datagen:datagen",
        "fbsource//xplat/security/lionhead/utils/lib_ftest:lib",
    ],
)
